package com.nine.entity;

/**
 * CommentId entity. @author MyEclipse Persistence Tools
 */

public class CommentId implements java.io.Serializable {

	// Fields

	public Integer itemId;
	public String customerId;

	// Constructors

	/** default constructor */
	public CommentId() {
	}

	/** full constructor */
	public CommentId(Integer itemId, String customerId) {
		this.itemId = itemId;
		this.customerId = customerId;
	}

	// Property accessors

	public Integer getItemId() {
		return this.itemId;
	}

	public void setItemId(Integer itemId) {
		this.itemId = itemId;
	}

	public String getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CommentId))
			return false;
		CommentId castOther = (CommentId) other;

		return ((this.getItemId() == castOther.getItemId()) || (this
				.getItemId() != null
				&& castOther.getItemId() != null && this.getItemId().equals(
				castOther.getItemId())))
				&& ((this.getCustomerId() == castOther.getCustomerId()) || (this
						.getCustomerId() != null
						&& castOther.getCustomerId() != null && this
						.getCustomerId().equals(castOther.getCustomerId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getItemId() == null ? 0 : this.getItemId().hashCode());
		result = 37
				* result
				+ (getCustomerId() == null ? 0 : this.getCustomerId()
						.hashCode());
		return result;
	}

}